<extend name="./Common/View/EasyUI/form.html"/>
<block name="form">
    <div class="row">
        <div class="span12">
            <form method="post" id="pageForm" class="form-horizontal" action="Sys/Config/edit">
                <input name="id" value="{$vo.id}" type="hidden">
                <table class="table table-bordered table-striped">
                    <tbody>
                    <tr>
                        <th colspan="2">配置信息</th>
                    </tr>
                    <tr>
                        <td class="revise-left" width="15%"><span class="text-error">*</span>配置代码:</td>
                        <td>
                            <input name="code" id="code" type="text" value="{$vo.code}" placeholder="请输入配置代码"
                                   class="easyui-validatebox"
                                   data-options="required:true,validType:'length[1,20]'">
                        </td>
                    </tr>
                    <tr>
                        <td class="revise-left" width="15%"><span class="text-error">*</span>配置名称:</td>
                        <td>
                            <input name="title" id="title" type="text" value="{$vo.title}" placeholder="请输入配置名称"
                                   class="easyui-validatebox"
                                   data-options="required:true,validType:'length[1,20]'">
                        </td>
                    </tr>
                    <tr>
                        <td class="revise-left" width="15%">启用状态:</td>
                        <td>
                            <label class="radio inline"><input type="radio" name="status" value="1"
                                <if condition="$vo.status eq 1"> checked="checked"</if>
                                >启用</label>
                            <label class="radio inline"><input type="radio" name="status" value="0"
                                <if condition="$vo.status eq 0"> checked="checked"</if>
                                >禁用</label>
                            <span class="help-inline"></span>
                        </td>
                    </tr>
                    <tr>
                        <td>配置说明</td>
                        <td>
                            <textarea cols="150" rows="3" name="remark" style="width: 400px;">{$vo.remark}</textarea>
                        </td>
                    </tr>
                    <tr>
                        <td>配置值</td>
                        <td>
                            <php>$field=array('name'=>'value','value'=>$vo['value']);</php>
                            <switch name="vo.type">
                                <case value="datetime" break="1">
                                    <include file="./Common/View/Field/datetime.html" />
                                </case>
                                <case value="date" break="1">
                                    <include file="./Common/View/Field/date.html" />
                                </case>
                                <case value="text" break="1">
                                    <include file="./Common/View/Field/text.html" />
                                </case>
                                <case value="number" break="1">
                                    <include file="./Common/View/Field/number.html" />
                                </case>
                                <case value="url" break="1">
                                    <include file="../Common/View/Field/url.html" />
                                </case>
                                <case value="file" break="1">
                                    <include file="./Common/View/Field/file.html" />
                                </case>
                                <case value="datetime" break="1">
                                    <include file="./Common/View/Field/datetime.html" />
                                </case>
                                <default/>
                                    <include file="./Common/View/Field/default.html" />
                            </switch>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </form>
        </div>
    </div>
</block>
<block name="script">
    <script type="text/javascript" src="__PUBLIC__/plupload/plupload.full.min.js"></script>
    <script type="text/javascript">
        $(function(){
            $('input[file_btn]').each(function(){
               app.upload({browse_button:$(this).attr('file_btn')})
            });
        })
    </script>
</block>